package net.infamily.model;

import java.util.LinkedList;
import java.util.List;

import javax.jdo.annotations.Element;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.NullValue;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Profile extends Entity {
	@Persistent
	private String profileName;

	@Persistent(nullValue=NullValue.EXCEPTION)
	private Family family;

	@Persistent(mappedBy = "from")
	@Element(dependent = "true")
	private List<ProfileLink> links = new LinkedList<ProfileLink>();

	public String getProfileName() {
		return profileName;
	}

	public void setProfileName(String profileName) {
		this.profileName = profileName;
	}

	public void setFamily(Family family) {
		this.family = family;
	}

	public Family getFamily() {
		return family;
	}

	public void setLinks(List<ProfileLink> links) {
		this.links = links;
	}

	public List<ProfileLink> getLinks() {
		return links;
	}
}
